<?php

use Illuminate\Http\Request;

Route::namespace('Wechat')->group(function(){
    

    
//-------------------------------//

	// 买家端 域名/wechat/user/
	Route::namespace('User')->prefix('user')->group(function(){	

		Route::post('info','UserController@info');

		// 店铺余额
		Route::post('shop-money','UserController@shopMoney');

		// 我的余额
		Route::post('money','UserController@money');

		
		

		// 购物车
		Route::post('cart','CartController@index');
		Route::post('cart-create','CartController@create');
		Route::post('cart-decrease','CartController@decrease');
		Route::post('cart-increase','CartController@increase');
		Route::post('cart-delete',		'CartController@delete');
		Route::post('cart-find',		'CartController@find');
		Route::post('cart-selected',	'CartController@selected');


		// 用户地址
		Route::post('address','AddressController@index');
		Route::post('address-show','AddressController@show');
		Route::post('address-update','AddressController@update');
		Route::post('address-create','AddressController@create');
		Route::post('address-delete','AddressController@delete');

		// 优惠券
		Route::post('coupon','UserCouponController@index');

		// 我的订单
		Route::post('order',	    'OrderController@index');
		Route::post('order/show' ,  'OrderController@show');
		Route::post('order/count',  'OrderController@orderCount');
		Route::post('order/cancle', 'OrderController@cancle');
		Route::post('order/point',	'OrderController@point');
		Route::post('order/save-cusomerservice',	'OrderController@saveCustomerService');
		
		Route::any('order/prepay',	    'OrderController@prepay'); //预付款
		Route::any('order/pay',	    'OrderController@pay'); //尾款

		
	

		
		
	});

	Route::post('get-city',       'IndexController@getCity');
	Route::post('make-order',     'OrderController@makeOrder');		
	


	Route::any('serve',     'IndexController@serve');
	
	Route::any('get-openid','IndexController@getOpenId');//获取openid

	// 获取店铺id
	Route::post('get-shop','IndexController@getShop');

	// 店铺基本信息
	Route::post('shop-info','IndexController@shopInfo');

	// 首页推荐商品
	Route::post('rec-product','IndexController@recProduct');

	// 首页推荐的秒杀
	Route::post('rec-sale','IndexController@recSale');

	Route::post('sale-list','ProductSaleController@index');
	

	// 商品详情
	Route::post('product-show','ProductController@show');

	Route::post('product-group','ProductController@group');

	Route::post('product-list','ProductController@index');

	// 配送方式
	Route::post('dispatch','DispatchController@index');

	
	//订单支付回调
	Route::any('pay-notify',    'PayController@payNotify'); // 付款回调
	Route::any('prepay-notify', 'PayController@prePayNotify'); // 付款回调

	// 红包充值回调接口
	Route::any('recharge-notify', 'PayController@rechargeNotify');

	
	
	// 婚车品牌
	Route::post('car-brands','CarBrandController@index');
	
	//滚动图
	Route::post('banner','IndexController@banner');

	//婚车装饰
	Route::post('decorate','DecorateController@index');

	// 服务商列表
	Route::post('shops','ShopController@index');
	

	Route::post('ask',    'AskController@index');
	Route::post('ask-add','AskController@add');
	
});